package io.renren.modules.sys.pojo;

import io.renren.common.util.BeanUtils;
import io.renren.modules.sys.entity.SysRoleEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
public class SysRoleMenuDTO extends SysRoleEntity{

    private static final long serialVersionUID = -3992874221161886315L;

    /**
     * 菜单ID列表
     */
    @ApiModelProperty("菜单ID列表")
    private List<Long> menuIdList;

    public SysRoleMenuDTO(SysRoleEntity entity){
        this.setRole(entity);
    }

    public void setRole(SysRoleEntity entity){
        BeanUtils.copyProperties(entity,this);
    }
}
